function getDataUrl(){
	return window.location;
}

function doDOM(json){
	var returnSize=0;
	var list=$("#list");
	$.each(json.newses,function(idx,item){
		returnSize=idx;
		var tr = generate_row(item);
		list.append(tr);
	});
	return returnSize;
}

function isFilled(){
	return (($(window).height+300)<$("#news_list").height);
}

function generate_row(item){
	var tr = $(document.createElement("tr"));
	var td1 = $(document.createElement("td"));
	var td2 = $(document.createElement("td"));
	var td3 = $(document.createElement("td"));
	var td4 = $(document.createElement("td"));
	td1.html(item.title);
	td2.html(item.author);
	td3.html(item.id);
	td4.html("<a href=\"admin/news/special/edit/"+name+"?TB_iframe=true&height=135&width=260\"" +
			" title=\"添加专题\" class=\"thickbox\">修改</a>\n"+
			"&nbsp;&nbsp;&nbsp;&nbsp;\n"+
			"<a href=\"admin/news/special/edit/"+name+"$?TB_iframe=true&height=135&width=260\"" +
			" title=\"添加专题\" class=\"thickbox\">删除</a>");
	tr.append(td1);
	tr.append(td2);
	tr.append(td3);
	tr.append(td4);
	return tr;
}

function search(){
	var sort=document.getElementById("special_sort").value;
	var key=document.getElementById("keywords").value;
	if(key=="")
		key="_";
	var base=document.getElementById("base_url").href;
	var href=(base+"admin/news/list/"+sort+"/"+key);
	window.location.href=href;
}
